import { Tools } from 'weaver-mobile';

// 基本信息
export const getPreview = params => {
    return Tools.callApi({
        url: '/api/meeting/field/getViewMeetingFieldMobx',
        method: 'POST',
        params,
    });
};

// 基本信息
export const getRequestParams = params => {
  return Tools.callApi({
      url: '/api/meeting/base/getRequestParams',
      method: 'POST',
      params,
  });
};

// 按钮信息
export const getBtns = params => {
  return Tools.callApi({
      url: '/api/meeting/field/getMeetingBtn4Mobile',
      method: 'POST',
      params,
  });
};

// 新建提交
export const submitMeeting = params => {
  return Tools.callApi({
      url: '/api/meeting/base/newMeeting',
      method: 'POST',
      params,
  });
};

// 新建保存
export const saveMeeting = params => {
  return Tools.callApi({
      url: '/api/meeting/base/newMeeting',
      method: 'POST',
      params,
  });
};

//变更会议
export const changeMeeting = params => {
	return Tools.callApi({
    url: '/api/meeting/base/changeMeeting',
    method: 'POST',
    params
  });
}

//编辑会议
export const editMeeting = params => {
	return Tools.callApi({
    url: '/api/meeting/base/editMeeting',
    method: 'POST',
    params
  });
}

//查看页面直接提交会议
export const reSubmit2 = params => {
	return Tools.callApi({
    url: '/api/meeting/base/submitMeeting',
    method: 'POST',
    params
  });
}

//复制会议
export const copyMeeting = params => {
	return Tools.callApi({
    url: '/api/meeting/base/copyMeeting',
    method: 'POST',
    params
  });
}

//提前结束
export const overMeeting = params => {
	return Tools.callApi({
    url: '/api/meeting/base/overMeeting',
    method: 'POST',
    params
  });
}

//取消会议
export const cancelMeeting = params => {
	return Tools.callApi({
    url: '/api/meeting/base/cancelMeeting',
    method: 'POST',
    params
  });
}

//删除会议
export const doDelete = params => {
	return Tools.callApi({
    url: '/api/meeting/base/deleteMeeting',
    method: 'POST',
    params
  });
}

//批准
export const doSubmit = params => {
	return Tools.callApi({
    url: '/api/meeting/base/doSubmit',
    method: 'POST',
    params
  });
}

//提交审批
export const doSubmit2 = params => {
	return Tools.callApi({
    url: '/api/meeting/base/doSubmit',
    method: 'POST',
    params
  });
}

//退回
export const doReject = params => {
	return Tools.callApi({
    url: '/api/meeting/base/doReject',
    method: 'POST',
    params
  });
}

//提交审批
export const reSubmit = params => {
	return Tools.callApi({
    url: '/api/meeting/base/reSubmit',
    method: 'POST',
    params
  });
}

// 创建/编辑/变更获取会议基本信息
export const getBaseFields = params => {
  return Tools.callApi({
      url: '/api/meeting/field/getMeetingBaseFieldMobx',
      method: 'POST',
      params,
  });
};

// 修改会议类型
export const changeBroserMeetingType = params => {
	return Tools.callApi({
    url:'/api/meeting/field/changeMeetingType', 
    method:'POST', 
    params
  });
}

export const chkMeeting = params => {
	return Tools.callApi({
    url:'/api/meeting/base/chkMeeting', 
    method:'POST', 
    params
  });
}

export const customMeetingChk = params => {
	return Tools.callApi({
    url:'/api/meeting/base/customMeetingChk', 
    method:'POST', 
    params
  });
}

export const getSeatInfo = params => {
	return Tools.callApi({
    url:'/api/meeting/seat/getSeatInfo',
    method:'POST', 
    params
  });
}

// 参会列表
export const getMemberList = params => {
    return Tools.callApi({
        url: '/api/meeting/member/getMemberList',
        method: 'POST',
        params,
    });
};

// 其他参会人员详情
export const getOtherMemberDetail = params => {
  return Tools.callApi({
      url: '/api/meeting/member/getOtherMemberDetail',
      method: 'POST',
      params,
  });
};

// 参会人员数量列表
export const getMemberCount = params => {
  return Tools.callApi({
      url: '/api/meeting/member/getMemberCountDetail',
      method: 'POST',
      params,
  });
};

// 参会回执详细
export const getMemberReceipt = params => {
  return Tools.callApi({
      url: '/api/meeting/member/getMemberReceipt',
      method: 'POST',
      params,
  });
};

// 参会人员回执
export const submitHrmReceipt = params => {
  return Tools.callApi({
      url: '/api/meeting/member/meetingReHrm',
      method: 'POST',
      params,
  });
};

// 参会客户回执
export const submitCrmReceipt = params => {
  return Tools.callApi({
      url: '/api/meeting/member/meetingReCrm',
      method: 'POST',
      params,
  });
};

// 签到列表
export const getSignList = params => {
    return Tools.callApi({
        url: '/api/meeting/sign/getSignList',
        method: 'POST',
        params,
    });
};

export const getQrCode = params => {
  return Tools.callApi({
    url: '/api/meeting/sign/getQrCode',
    method: 'POST',
    params,
  });
}

export const  getSignCount = params => {
  return Tools.callApi({
      url: '/api/meeting/sign/getSignCount',
      method: 'POST',
      params,
  });
};

// 签到列表(11-20 设计稿修改 取得签到列表有变化 开发中取名为getSignList2)
export const getSignList2 = params => {
  return Tools.callApi({
      url: '/api/meeting/sign/getSignList4mobile',
      method: 'POST',
      params,
  });
};


// 会议交流提交
export const submitReply = params => {
  return Tools.callApi({
      url: '/api/meeting/exchange/save',
      method: 'POST',
      params,
  });
};

// 会议交流提交
export const pushMessage = params => {
  return Tools.callApi({
      url: '/api/ec/dev/message/groupsendmessage',
      method: 'POST',
      params,
  });
};

export const pushAtMessage = params => {
  return Tools.callApi({
    url: '/api/ec/dev/message/groupsendmessage',
    method: 'POST',
    params,
});
}

// 会议交流提交
export const getExchangeList = params => {
  return Tools.callApi({
      url: '/api/meeting/exchange/getExchangeList',
      method: 'POST',
      params,
  });
};

export const getExchangeHrmList = params => {
  return Tools.callApi({
    url: '/api/meeting/exchange/getExchangeHrmList',
    method: 'POST',
    params,
});
}

// 会议决议基本信息
export const getDecisionBaseData = params => {
  return Tools.callApi({
      url: '/api/meeting/decision/getBaseData',
      method: 'POST',
      params,
  });
};

// 会议新建签到基本信息
export const getSignCreateSet = params => {
  return Tools.callApi({
      url: '/api/meeting/sign/getSignCreateSet',
      method: 'POST',
      params,
  });
};

// 会议新建签到基本信息
export const saveSignCreateSet = params => {
  return Tools.callApi({
      url: '/api/meeting/sign/saveSignCreateSet',
      method: 'POST',
      params,
  });
};

// 会议决议查看详细信息
export const getDecisionList = params => {
  return Tools.callApi({
      url: '/api/meeting/decision/getDetail4Mobile',
      method: 'POST',
      params,
  });
};

// 会议决议editTable 的condition
export const getDecisionCondition = params => {
  return Tools.callApi({
      url: '/api/meeting/decision/getDetailCondition',
      method: 'POST',
      params,
  });
};

// 编辑会议决议信息
export const editDecision = params => {
  return Tools.callApi({
      url: '/api/meeting/decision/edit',
      method: 'POST',
      params,
  });
};

// 提交决议基本信息
export const submitDecision = params => {
  return Tools.callApi({
      url: '/api/meeting/decision/submit',
      method: 'POST',
      params,
  });
};

// cx start
// 会议议程基本信息
export const getTopic_Condition = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/getTopicCondition',
      method: 'POST',
      params,
  });
};
export const getTopic_Data = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/getTopicDetail',
      method: 'POST',
      params,
  });
};

// 会议服务基本信息
export const getService_Condition = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/getServiceCondition',
      method: 'POST',
      params,
  });
};
export const getService_Data = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/getServiceDetail',
      method: 'POST',
      params,
  });
};

// cx end
// 会议客户回执查看详细信息
export const getReceiptCrmList = params => {
  return Tools.callApi({
      url: '/api/meeting/member/getReceiptCrmList',
      method: 'POST',
      params,
  });
};

// 会议客户回执editTable 的condition
export const getReceiptCrmCondition = params => {
  return Tools.callApi({
      url: '/api/meeting/member/getReceiptCrmCondition',
      method: 'POST',
      params,
  });
};

// 获取服务项目相关的负责人员
export const getService_project_hrminfo = params => {
  return Tools.callApi({
      url: '/api/meeting/servepro/getServeProHrmIds',
      method: 'POST',
      params,
  });
};

// 获取签退人员信息列表
export const getSignBackList4mobile = params => {
  return Tools.callApi({
      url: '/api/meeting/sign/getSignBackList4mobile',
      method: 'POST',
      params,
  });
};

// 议程资料保存
export const addtopicdoc = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/addtopicdoc',
      method: 'POST',
      params,
  });
};

// 议程资料删除
export const deltopicdoc = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/deltopicdoc',
      method: 'POST',
      params,
  });
};

// 获取议程资料
export const getTopicDocList = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/getTopicDocList',
      method: 'POST',
      params,
  });
};

// 获得时间安排数据
export const getTopicDate = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/gettopicdate',
      method: 'POST',
      params,
  });
};

// 保存时间安排数据
export const saveTopicDate = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/savetopicdate',
      method: 'POST',
      params,
  });
};

// 保存整理议程数据
export const saveTopicTidy = params => {
  return Tools.callApi({
      url: '/api/meeting/detail/saveTopicTidy',
      method: 'POST',
      params,
  });
};